/* 
 * elliott-common.h
 * CPSC 463 Homework 2
 * by Michael Elliott
 *
 */

// some common .h files every .cpp needs
#pragma once
#include <stdio.h>
#include <queue>
#include <map>
#include <set>
#include <string>

/* query classes */
#define DNS_INET 1

/* DNS query types */
#define DNS_A 1      /* name -> IP */
#define DNS_NS 2     /* name server */
#define DNS_CNAME 5  /* canonical name */
#define DNS_PTR 12   /* IP->name */
#define DNS_HINFO 13 /* host info */
#define DNS_MX 15    /* mail exchange */
#define DNS_AXFR 252 /* request for zone transfer */
#define DNS_ANY 255  /* all records */

/* DNS result codes */
#define DNS_OK 0         /* rcode = reply codes */
#define DNS_FORMAT 1     /* format error (unable to interpret) */
#define DNS_SERVERFAIL 2 /* server failure */
#define DNS_ERROR 3      /* no DNS entry */
#define DNS_NOTIMPL 4    /* not implemented */
#define DNS_REFUSED 5    /* server refused the query */

#define DNS_QUERY (0 << 15)
#define DNS_RESPONSE (1 << 15)
#define DNS_STDQUERY (0)
#define DNS_INVQUERY (1 << 11)
#define DNS_SRVSTATUS (1 << 12)

#define DNS_AA (1 << 10)
#define DNS_TC (1 << 9)
#define DNS_RD (1 << 8)
#define DNS_RA (1 << 7)


using namespace std;		// if you're planning to use STL
